#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
int main()
{
	int Length=0,i=0;
	while (scanf("%d", &Length) != EOF)
	{
		for (i = 1; i <= Length * Length; i++)
		{
			printf("* ");
			if (i % Length == 0)
				printf("\n");
		}
	}
	
	return 0;
}
